package com.iuhao.controller;

import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONUtil;
import com.iuhao.vo.QueryVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class DockerController {

    @RequestMapping("/hello")
    public String index() {
        log.error("测试接口:{}", DateUtil.date());
        return "Hello Docker!";
    }


    @PostMapping("/query")
    public String query(@RequestBody QueryVo vo) {
        log.error("测试时间{},参数:{}", DateUtil.date(), JSONUtil.toJsonStr(vo));
        return "Hello query!";
    }
}